<# # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: Script is designed To export registry hive data # Configuration Type - COMPUTER / USER # Arguments - Registry Hive & Output Location should be hardcoded inside the script # Note: If it is Computer Based Hive the configuration to be executed as Computer Based configuration If it is User Based Hive the configuration to be executed as User Based configuration # Limitation: The common shared path must be accessible by everyone; otherwise, change the path to a local one and adjust the type based on the new path. #> # Computer Name $computername = $env:COMPUTERNAME # Define the registry hive and output file path $registryHive = "HKLM\Software" # Change this to your desired hive $outputFile = "\\CommonSharePath\$computername.reg" # Change this to your desired output path # Export the registry hive reg export $registryHive $outputFile /y # Check if the export was successful if (Test-Path $outputFile) { Write-Host "Registry hive exported successfully to $outputFile" } else { Write-Host "Failed to export registry hive." }